<table class="table table-striped">
    <thead>
        <tr>
            <th>{:__('Title')}</th>
            <th>{:__('Content')}</th>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td> {if $row['ordertype'] == 1}活动{elseif $row['ordertype'] == 2 /}系列{/if}名称:</td>
        <td>{$row['name']}</td>
    </tr>

    <tr>
        <td>退款金额(¥):</td>
        <td>{$row['amount']}</td>
    </tr>
    </tbody>
</table>



<div class="hide layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">

    <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
        {if $row['state'] == 2}
        <button href="javascript:;" class="btn btn-info btn-agree" title="通过" onclick="agree()">通过 </button>
        {/if}
    </div>
</div>


<script>
    function agree() {
        //  var ids = parseFloat(id);
        var ids = {$row['id']};
        var data={
            "ids": ids,
        };
        $.ajax({
            type: "GET",
            url: "trades/order/order/refund",
            data: data,
            contentType: "application/json;charset=utf-8",
            confirm: '确认发送操作请求？',
            success: function (data, ret) {
                Layer.alert( "返回数据：" + JSON.stringify(data));
                // //如果需要阻止成功提示，则必须使用return false;
                // table.bootstrapTable('refresh',{});
                // top.window.location.reload();
                // Fast.api.close();
                //关闭弹出框
                //Fast.api.close(data);
                //刷新父级页面
                window.parent.location.reload();
                //刷新当前页面
                //table.bootstrapTable('refresh', {});
                //return true;
            },
            error: function (data, ret) {
                //console.log(data, ret);
                Layer.alert(ret.msg);
                return false;
            }

        });
    }


</script>
